#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <sys/ioctl.h>
#include <sys/mman.h>
#include <linux/fb.h>
#include <string.h>
#include <stdio.h>


#include <disp_manager.h>



static DispOpr *g_ptDispDevs = NULL;


void RegisterDispOpr(DispOpr *ptDispOpr)
{
    ptDispOpr->ptNext = g_ptDispDevs;
    g_ptDispDevs = ptDispOpr;
}



void RegisterAllDispOpr(void)
{
    extern void RegisterFB(void);
    RegisterFB();
}



void ShowAllDispOpr(void)
{
	PDispOpr ptTmp = g_ptDispDevs;
	int i = 0;
	while (ptTmp)
	{
		printf("%02d %s\n", i++, ptTmp->name);
		ptTmp = ptTmp->ptNext;
	}
}



PDispOpr ChooseDefaultDispOpr(char *name)
{
	PDispOpr ptTmp = g_ptDispDevs;
	while (ptTmp)
	{
		if (strcmp(ptTmp->name, name) == 0)
		{
			return ptTmp;
		}
		ptTmp = ptTmp->ptNext;
	}
	return NULL;
}









